/**
 * 
 */
package com.baihui.crm.export;

import com.baihui.crm.BaihuiSession;
import com.baihui.taobao.authorize.TaoBaoSessionInfo;
import com.baihui.taobao.db.GeneDAO;
import com.baihui.taobao.db.ItemDao;

import java.util.List;
import java.util.Map;

/**
 * @author dev
 * 
 */
public class ExportProduct extends ExportData {

	public ExportProduct(BaihuiSession baihuiSession,
			TaoBaoSessionInfo taoBaoSessionInfo) {
		super(baihuiSession, taoBaoSessionInfo);
		// TODO Auto-generated constructor stub
	}

	@Override
	public GeneDAO getDomainDAO() {
		return new ItemDao();
	}
	

	public void exportProduct(Long userid) throws Exception {
		exportData(Products, userid);
	}

	/**
	 * 库存信息需要即时查询，因此在导出数据时来更新.
	 * 
	 * @param allData
	 * @param type
	 * @param userid
	 * @return
	 */
	protected List<Map> constructureData(List<Map> allData, String type,
			Long userid) throws Exception {
		if (allData == null || allData.size() <= 0)
			return null;
		
		return allData;
	}

	@Override
	public String[] getEntryKeys() {
		return new String[] {  };
	}

}
